home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 1.6 / Buddy API Docs.swf / texts / 1696.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  3.4 KB  |  149 lines

  1. 182
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. NextActiveWindow 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows and Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baNextActiveWindow returns the next window to become active.
  20. --- RECORDSEPARATOR ---
  21.  
  22. --- RECORDSEPARATOR ---
  23. Usage:
  24. --- RECORDSEPARATOR ---
  25.  
  26. --- RECORDSEPARATOR ---
  27. Result = baNextActiveWindow( TimeOut )
  28. --- RECORDSEPARATOR ---
  29.  
  30. --- RECORDSEPARATOR ---
  31. Arguments:
  32. --- RECORDSEPARATOR ---
  33.  
  34. --- RECORDSEPARATOR ---
  35. Integer 
  36. --- RECORDSEPARATOR ---
  37. TimeOut is the maximum amount of time to wait in ticks. A tick is equal to 1/60th of 
  38. --- RECORDSEPARATOR ---
  39. a second. If TimeOut is 0, the function will wait indefinitely.
  40. --- RECORDSEPARATOR ---
  41.  
  42. --- RECORDSEPARATOR ---
  43. Returns:
  44. --- RECORDSEPARATOR ---
  45.  
  46. --- RECORDSEPARATOR ---
  47. Integer. 
  48. --- RECORDSEPARATOR ---
  49. Returns the handle of the next active window. 
  50. --- RECORDSEPARATOR ---
  51. Returns 0 if the timeout occurs before another window becomes active.
  52. --- RECORDSEPARATOR ---
  53.  
  54. --- RECORDSEPARATOR ---
  55. Examples:
  56. --- RECORDSEPARATOR ---
  57.  
  58. --- RECORDSEPARATOR ---
  59. Director: 
  60. --- RECORDSEPARATOR ---
  61. set wnd = baNextActiveWindow( 300 )
  62. --- RECORDSEPARATOR ---
  63.  -- waits for the next window to become 
  64. --- RECORDSEPARATOR ---
  65. active, for a maximum of 5 seconds
  66. --- RECORDSEPARATOR ---
  67.  
  68. --- RECORDSEPARATOR ---
  69. Authorware: 
  70. --- RECORDSEPARATOR ---
  71. wnd := baNextActiveWindow( 600 )
  72. --- RECORDSEPARATOR ---
  73.  
  74. --- RECORDSEPARATOR ---
  75. Notes:
  76. --- RECORDSEPARATOR ---
  77.  
  78. --- RECORDSEPARATOR ---
  79. This f
  80. --- RECORDSEPARATOR ---
  81. unction will not operate with versions of Authorware earlier than 3.0. 
  82. --- RECORDSEPARATOR ---
  83. The next active window is defined as the next window that isn't the window of the 
  84. --- RECORDSEPARATOR ---
  85. Director/Authorware calling program, or a dialog box or a splash screen. It would be 
  86. --- RECORDSEPARATOR ---
  87. typically used after a baRunProgram or baOpenFile call to get the handle of the 
  88. --- RECORDSEPARATOR ---
  89. window the program opens, and is particularly useful for applications such as 
  90. --- RECORDSEPARATOR ---
  91. Netscape and Acrobat that open splash screens. 
  92. --- RECORDSEPARATOR ---
  93. Here is an example of opening an Acrobat file in Director, and closing it when the 
  94. --- RECORDSEPARATOR ---
  95. user is finished with it. 
  96. --- RECORDSEPARATOR ---
  97. if baOpenFile( "readme.pdf" , "normal" ) > 32 then 
  98. --- RECORDSEPARATOR ---
  99. --
  100. --- RECORDSEPARATOR ---
  101.  open acrobat file
  102. --- RECORDSEPARATOR ---
  103.  
  104. --- RECORDSEPARATOR ---
  105. set wnd = baNextActiveWindow( 0 ) 
  106. --- RECORDSEPARATOR ---
  107. --
  108. --- RECORDSEPARATOR ---
  109.  get handle of Acrobat window
  110. --- RECORDSEPARATOR ---
  111.  
  112. --- RECORDSEPARATOR ---
  113. baWaitForWindow( baWinHandle() , "active" , 0 ) 
  114. --- RECORDSEPARATOR ---
  115. --
  116. --- RECORDSEPARATOR ---
  117.  wait till the Director window 
  118. --- RECORDSEPARATOR ---
  119. -- is active ie Acrobat has been closed 
  120. --- RECORDSEPARATOR ---
  121. -- or user switched back to Director
  122. --- RECORDSEPARATOR ---
  123.  
  124. --- RECORDSEPARATOR ---
  125. if baWindowExists( wnd ) then 
  126. --- RECORDSEPARATOR ---
  127. baCloseWindow( wnd ) 
  128. --- RECORDSEPARATOR ---
  129. --
  130. --- RECORDSEPARATOR ---
  131.  close Acrobat
  132. --- RECORDSEPARATOR ---
  133.  
  134. --- RECORDSEPARATOR ---
  135. end if 
  136. --- RECORDSEPARATOR ---
  137. end if
  138. --- RECORDSEPARATOR ---
  139.  
  140. --- RECORDSEPARATOR ---
  141. See also:
  142. --- RECORDSEPARATOR ---
  143.  
  144. --- RECORDSEPARATOR ---
  145. baWaitTillActive 
  146. --- RECORDSEPARATOR ---
  147. baWaitForWindow 
  148. --- RECORDSEPARATOR ---
  149. baActiveWindow